﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.CodeDom.Compiler;

namespace RobotBattle2.Scripting {
	public class AssignmentStatement : Statement {
		public AssignmentStatement() { }
		public AssignmentStatement(Expression target, Expression value) {
			this.Target = target;
			this.Value = value;
		}

		public Expression Target { get; set; }
		public Expression Value { get; set; }

		public override void Dump(IndentedTextWriter writer) {
			Target.Dump(writer);
			writer.Write('=');
			Value.Dump(writer);
			writer.WriteLine(';');
		}

		public override StatementType Type { get { return StatementType.Assignment; } }
	}
}
